//文件说明
// 登录相关api app
let express = require('express');
let router = express.Router();

let {
  addUser
} = require('./../services/login')

let sendMail = require('./../utils/mail') //获取邮箱方法
let {
  bcrypt_encryption
} = require('./../utils/bcryptjs') //加密方法
// 测试

/* GET home page. */
router.post('/login', (req, res, next) => {
  console.log(req.body.email, '我是拿到的参数')

  let {} = req.body;


  // addUser(req.body).then(res=>{

  // })




  let encryption_password = bcrypt_encryption(req.body.email)


  console.log(encryption_password, '我是加密后的值')

  // sendMail(req.body.email)
  //   .then(asd => {
  //     res.json({
  //       msg: '发送邮件成功',
  //       status: 200
  //     });
  //   })
});




module.exports = router;